﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/Login',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: 'admin',
    icon: 'AccountBookOutlined',
    access: 'canAgent',
    routes: [
      {
        path: '/admin/add-page',
        name: 'add-page',
        icon: 'smile',
        component: './account/AddAccount',
      },
      {
        path: '/admin/reduction-page',
        name: 'reduction-page',
        icon: 'smile',
        component: './account/ReductionAccount',
      },
      {
        path: '/admin/upload-page',
        name: 'upload-page',
        icon: 'smile',
        component: './account/UploadAccount',
      },
      {
        path: '/admin/sub-page',
        name: 'sub-page',
        icon: 'smile',
        component: './account/NoLoginList',
      },
      {
        path: '/admin/collection-page',
        name: 'collection-page',
        icon: 'smile',
        component: './account/CollectionList',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/merchant',
    name: 'merchant',
    icon: 'QrcodeOutlined',
    access: 'canMerchant',
    routes: [
     {
        path: '/merchant/merchant-page',
        name: 'merchant-page',
        icon: 'smile',
        component: './merchant/MerchantList',
      },
      {
        path: '/merchant/reward-page',
        name: 'reward-page',
        icon: 'smile',
        component: './merchant/MerchantReward',
      },
      {
        path: '/merchant/add-reward-page',
        name: 'add-reward-page',
        icon: 'smile',
        component: './merchant/AddMerchantReward',
      }
      // ,
      // {
      //   path: '/merchant/merchant-extent',
      //   name: 'merchant-extent',
      //   icon: 'smile',
      //   component: './merchant/MerchantExtentList',
      // }
    ],
  },
  {
    path: '/query',
    name: 'query',
    icon: 'SearchOutlined',
    access: 'canMerchant',
    routes: [
      {
        path: '/query/query-page',
        name: 'query-page',
        icon: 'smile',
        component: './query/QueryAgent',
      },{
        path: '/query/wa-page',
        name: 'wa-page',
        icon: 'smile',
        component: './query/WhatsAppAgent',
      }
    ],
  },
  // {
  //   path: '/',
  //   redirect: '/welcome',
  // },
  {
    component: './404',
  },
];
